from flask import *
import os
from flask_sqlalchemy import SQLAlchemy

def get_app():
    app = Flask(__name__)
    app.secret_key = os.urandom(24)
    app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:emwj2016@123.206.6.132:3306/bitserver?charset=utf8mb4'
    app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
    return app